if (WITH_OPENCV AND OpenCV_VERSION VERSION_LESS 4)
  include_directories(${PROJECT_SOURCE_DIR}/3rdparty/cvblob)
  include_directories(${PROJECT_SOURCE_DIR}/include/shapes/)
  include_directories(${PROJECT_SOURCE_DIR}/include/thermo/)
  include_directories(/usr/include/)
  include_directories(/usr/include/opencv)

  add_executable(caliboard caliboard.cc)
  add_executable(thermo thermo.cc)

  target_link_libraries(caliboard scan shape ${NEWMAT_LIBRARIES} ${ANN_LIBRARIES} ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY})
  target_link_libraries(thermo scan shape ${NEWMAT_LIBRARIES} ${ANN_LIBRARIES} ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} cvblob ${OpenCV_LIBS})
  if (WIN32)
    target_link_libraries(caliboard XGetopt)
    target_link_libraries(thermo XGetopt)
  endif()
endif()
